package com.kwshare.common.api;

import com.kwshare.common.core.constant.ServiceNameConstants;
import com.kwshare.common.core.domain.Response;
import com.kwshare.common.core.domain.auth.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 用户服务
 *
 * @author yangjing
 */
@Component
@FeignClient(value = ServiceNameConstants.USER_SERVICE)
public interface RemoteUserService {

    /**
     * 根据用户账号查询信息
     *
     * @param username 账号
     * @return 用户信息
     */
    @GetMapping("/info/{username}")
    Response<LoginUser> userInfo(@PathVariable("username") String username);
}
